/* 
 * File:   Administrator.cpp
 * Author: user
 * 
 * Created on July 26, 2014, 10:42 AM
 */

#include "Administrator.h"

Administrator::Administrator() : User("",0){
}

Administrator::Administrator(string userID,int userType) : User(userID,userType){
}

Administrator::Administrator(const Administrator& orig) {
}

Administrator::~Administrator() {
}

void Administrator::printMenu()
{
    cout << endl;
    cout << "*****Administrator menu*****" << endl;
    cout << "---------------------------------" << endl << endl ;
    cout << "1)     Add Lecturer" << endl;
    cout << "2)     Update Lecturer" << endl;
    cout << "3)     Delete Lecturer" << endl;
    cout << "4)     Show all user account" << endl;
    cout << "0)     Log out" << endl << endl;
    //cout << "99)     Quit program" << endl << endl;
}

bool Administrator::menuAction(int iSelection,bool& isExitProgram, int& loginStatus)
{
    switch (iSelection)
    {
        case 0: //Log out
        {
            menuItemAction(LOG_OUT,isExitProgram,loginStatus);
            break;
        }
        case 1: //Add account
        {
            menuItemAction(ADD_ACCT,isExitProgram,loginStatus);  
            break;
        }
        case 2: //Update account
        {
            menuItemAction(UPDATE_ACCT,isExitProgram,loginStatus);  
            break;
        }
        case 3: //delete account
        {
            menuItemAction(DEL_ACCT,isExitProgram,loginStatus);   
            break;
        }
        case 4:
        {
            displayAllUserAccount("");
            break;
        }
        case 99:
        {
            menuItemAction(QUIT_PROGRAM,isExitProgram,loginStatus); 
            break;
        }
    }
    
    return true;
}

